With continuous development of science and technology, intelligent machines are increasingly used. The intelligent machine systems have a similar structure, as shown in FIG. 1, including a main control module 1 configured to implement automatic control on each component of the intelligent machine system; other necessary components 2 including an actuator, complex mechanism, and a man-machine interface, etc.; and a function module 3 including a large number of sensors, such as an image sensor, a distance sensor and a position sensor, etc., distributed at a plurality of regions of the intelligent machine system. The function module is connected to the main control module to facilitate the control module to acquire states and data of the sensors in the function module. To move more flexible, normally, the intelligent machine is required to have a volume as small as possible.
For the numerous sensors of the function module 3, the position sensor is mainly configured to detect whether an object under detection is in position. The position of the object is detected mainly through optical method. The hardware structure for the method mainly includes a first part and a second part, where the first part (A) is a light-emitting end, the second part (B) is a light-sensitive end, light emitted by the light-emitting end A strikes the light-sensitive end B, and the light-sensitive end B converts, according to the light intensity, the light into a voltage signal for output. If a light path between the light-emitting end A and the light-sensitive end B is not obstructed, i.e., the object under detection is not in a predetermined position, the light-sensitive end B output a low-level voltage; and if the light path between the light-emitting end A and the light-sensitive end B is obstructed, i.e., the object under detection is in the predetermined position, the light-sensitive end B outputs a high-level voltage. Hence, the position sensor may also be regarded as a position switch. If the object under detection is not in the predetermined position, the light-sensitive end B outputs the low level voltage; and if the object under detection is in the predetermined position, the light-sensitive end B outputs the high level voltage. Alternatively, the position switch may be a switch with a conductive contact, such as a microswitch.
To implement automatic control, normally a large number of position switches need to be installed inside the function module of the intelligent machine, and the main controller needs to acquire states of these position switches at the same time, to accurately determine whether the object under detection is in position. To enable the main control module to acquire the states of the position switches, wired connections need to be established between the position switches inside the function module and the main control module. It is well known that the more the position switches are, the more the cables between the main control module and the function module are, and the greater the diameter of the cable bundle is. It is assumed that 50 position switches are needed to be installed inside one function module, normally each position switch has three lines (one is a power line, another one is a ground wire, and yet another one is a data line), thus there are totally 150 lines. If all these 150 lines need to be connected to the main control module, the diameter of the cable bundle may be very large. In a machine with a strictly limited volume, the cable bundle with such a large diameter is not allowed.
Two conventional methods are used to reduce number of cables between the function module and the main control module to reduce the diameter of the cable bundle.
As shown in FIG. 2, the first method is to, for all position switches inside the function module, uniformly connect power lines together, uniformly connect the ground wires together, and connect the uniformly connected power lines and ground wires to the main control module, i.e., all position switches share a power line and a ground wire, and connect all data lines of respective position switches to the main control module. If number of the position switches is N, with this method, number of cables between the main control module and the function module may be reduced to a minimum of N+2.
However, with this method, if there are a lot of position switches, there are still a lot of cables between the function module and the main control module.
As shown in FIG. 3, the second method is to, based on the first method, uniformly connect data lines of all position switches inside the function module to a converter, use the converter to convert the state signals of all position switches into serial data, transmit the serial data to the main control module through one cable, input commands, which are transmitted from the main control module and aimed to the position switches, to the converter through one cable, execute the commands transmitted from the main control module through the converter, convert the state signals of the position switches into serial data, and return the serial data to the main control module. With this method, the state signals for multiple position switches may be sequentially output, and number of the cables may reduce to about 4.
In the second method, since the main control module use a serial reading, it takes more time in one acquisition of an output signal of a position switch, thus real time performance is poor. In addition, in the serial reading method, a digital signal is transmitted, and the digital signal can only carry state information for one position switch at a time. To transmit the states for multiple position switches, the state information for multiple position switches must be transmitted one by one in a chronological order, and to implement function for transmitting one by one in the chronological order, a sequential circuit is necessitated. Hence, a circuit board for implementing serial to parallel and parallel to serial conversion must be embedded in the converter. The circuit board is mainly composed of the sequential circuit which is hard to automatically recover after disturbance, therefore a wrong position signal may be transmitted to the main control module or it needs to take more time to perform fault detection and correction.
Therefore a method, through which number of cables between the main control module and the function module may be reduced while the main control module can quickly and accurately acquire state signals of respective position switches, is badly needed.